package com.ruoyi.back.controller

import com.ruoyi.app.common.Data
import com.ruoyi.back.domain.WxPaySetting
import com.ruoyi.back.service.WxPaySettingService
import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.*

@RestController
@RequestMapping("system/wxPaySetting")
@Api(tags = ["系统设置-支付设置-微信"])
class WxPaySettingController {

    @Autowired
    private lateinit var wxPaySettingService: WxPaySettingService


    @ApiOperation("设置微信支付设置信息")
    @PostMapping("save")
    fun saveWxPaySetting(@RequestBody wxPaySetting: WxPaySetting): Data<Boolean> = wxPaySettingService.saveWxPaySetting(wxPaySetting)

    @ApiOperation("获取微信支付设置信息")
    @GetMapping("get")
    fun getWxPaySetting(): Data<WxPaySetting> = wxPaySettingService.getWxPaySetting()
}